<template>
	<view>
		<text>测试页面123123</text>
		<input type="text" v-model="username">
		<text>{{username}}</text>
		<FilmItem name="大黄蜂" src="../../static/logo.png" v-model="username"></FilmItem>
		<view>
			<text>计数器:{{count}}</text>
			<button type="default" @click="handleAdd">加1</button>
		</view>
	</view>
</template>

<script>
	import FilmItem from '../../components/FilmItem/FilmItem.vue'
	import {mapState,mapMutations} from 'vuex'
	export default {
		data() {
			return {
				username:""
			}
		},
		computed:{
			...mapState(["count"])
		},
		methods: {
			...mapMutations(["increment"]),
			handleAdd(){
					this.increment(10);
			}
		},
		components:{
			FilmItem
		}
	}
</script>

<style>

</style>
